﻿<%@ page title="Dialog Widget" language="C#" masterpagefile="~/standard.master" codefile="dialog.aspx.cs" inherits="Sample.JQuery.DialogPage" %>
<asp:content id="Content" contentplaceholderid="ContentPlaceHolder" runat="server">
	<div><asp:hyperlink runat="server" id="CodeLink" navigateurl="~/code.aspx?file=dialog&title=Dialog+Widget+Code" text="View Source Code" /></div>
	
	<div>The server time is <%=DateTime.Now.ToLongTimeString()%>.</div>
	<asp:button runat="server" id="TraditionalPostBackButton" text="Traditional Post-back" />
	<input type="button" value="Client-Side Open" onclick="<%= Dialog.GenerateOpenScript() %>" />
	<asp:button runat="server" id="ServerOpenButton" text="Server-Side Open" />
	
	<jquery:dialog runat="server" id="Dialog" title="Dialog" width="640" modal="true" show="Normal" hide="Normal" buttons="DialogButtonDef">
		<content>
			<p>
				This is the njQuery ASPX implementation of the
				<jquery:themedicon id="Themedicon1" runat="server" icon="ui-icon-newwin" tooltip="Opens in New Window" />
				<a href="http://jqueryui.com/demos/dialog/" target="_blank">jQuery UI Dialog Widget</a>.
			</p>
			<p>
				The post-back below is a simple ASPX button control with no UpdatePanel.
				Notice how all timestamps on the page update.
			</p>
			<asp:button runat="server" id="DialogTraditionalPostBackButton" text="Traditional Post-back" />
			<asp:updatepanel runat="server" id="UpdatePanel">
				<contenttemplate>
					<p>
						The post-back below is inside an UpdatePanel control.
						Notice how the timestamp on the dialog updates, while the timestamp on the page does not.
					</p>
					<asp:button runat="server" id="AjaxPostBackButton" text="UpdatePanel Post-back" />
					The server time is <%=DateTime.Now.ToLongTimeString()%>.
				</contenttemplate>
			</asp:updatepanel>
		</content>
		<buttons>
			<jquery:dialogbutton runat="server" id="InvisibleButton" text="Invisible Button" visible="false" />
			<jquery:dialogbutton runat="server" id="ServerCloseButton" text="Server-Side Close" postbackonclick="true" />
			<jquery:dialogbutton runat="server" id="ClientCloseButton" text="Client-Side Close" closedialog="true" />
		</buttons>
	</jquery:dialog>
	
</asp:content>